package com.zt.bus.shiro.auth;

import com.monkeyk.os.domain.oauth.AccessToken;
import com.monkeyk.os.domain.oauth.ClientDetails;
import com.monkeyk.os.domain.rs.OAuthRSRepository;
import com.monkeyk.os.infrastructure.jdbc.AbstractJdbcRepository;
import com.zt.user.api.UserApi;
import org.springframework.stereotype.Repository;

@Repository("oauthRSApiRepository")
public class OAuthRSApiRepository extends AbstractJdbcRepository implements OAuthRSRepository {

    @Override
    public AccessToken findAccessTokenByTokenId(String tokenId) {
        return UserApi.getAccessTokenByTokenId(tokenId);
    }

    @Override
    public ClientDetails findClientDetailsByClientIdAndResourceIds(String clientId, String resourceIds) {
        return UserApi.getClientDetailsByClientIdAndResourceIds(clientId, resourceIds);
    }
}
